package t3;

import t3bean.ParkingLotBean;
import t3bean.ParkingSpaceBean;

/**
 * 查询停车位状态
 *
 */
public class SelectAllParkingSpace {
	public void selectAllParkingSpace(ParkingLotBean pL) {
		for (ParkingSpaceBean ps : pL.getpSList()) {
			System.out.println("车位" + ps.getId() + 1);
			if (ps.getIsParking() == 1) {
				System.out.println("已停车");
				System.out.println("车牌号" + ps.getCar().getLicensePlate());
			} else if (ps.getIsParking() == 0) {
				System.out.println("未停车");
			}
			System.out.println();
		}
	}
}
